package us.gaaoc.framework.dao;
/*
 * @author Frank
 */
import org.hibernate.Query;

import us.gaaoc.framework.model.Court;
import us.gaaoc.framework.model.LdapDirectoryOrganization;

public class LdapDirectoryOrganizationDAOHibernate extends
GenericHibernateDAO<LdapDirectoryOrganization, String, LdapDirectoryOrganizationDAO> implements
LdapDirectoryOrganizationDAO {
	
	public LdapDirectoryOrganization findLdapDirectoryByOrganization(Court court) {
	//public LdapDirectoryOrganization findLdapDirectoryByOrganization(Organizations court) {
		Query q = getSession().createQuery("from LdapDirectoryOrganization d where d.court = ?" );
		q.setEntity(0, court);
		return  (LdapDirectoryOrganization)q.uniqueResult();
	}
}